home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / netinfo.369 < prev    next >
Text File  |  1992-02-06  |  5KB  |  154 lines

  1. {\rtf0\ansi{\fonttbl\f2\fnil Times-Roman;\f0\fmodern Courier;}
  2. \paperw13040
  3. \paperh10200
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f2\b0\i0\ul0\fs24 netboot bootptab bootpd kernel tftpboot directory\
  7. \
  8. Q: From where does a netboot server (bootpd) get its “served kernel” information?\
  9. \
  10. A:  The netboot server gets its kernel information from 
  11. \b two
  12. \b0  sources:\
  13. \
  14.     • NetInfo and\
  15.     • 
  16. \f0 /etc/bootptab
  17. \f2 .\
  18. \
  19. (Yes, from both.  Even if NetInfo is running, the file is consulted.)\
  20. \
  21. There are two types of bootpd information: global (i.e., for all netboot clients) and local (i.e., for a specific client).  The global information is read from the file\
  22. \
  23.  
  24. \f0     /etc/bootptab
  25. \f2 ;\
  26. \
  27. the local information comes from NetInfo (the /machines/
  28. \i client
  29. \i0  directory).\
  30. \
  31. There are two pieces of global information: the tftpboot root directory, and the default kernel to be served.  [What's 
  32. \i tftpboot
  33. \i0 ?  It's the file transfer mechanism used for netbooting —
  34. \i  t
  35. \i0 rivial 
  36. \i f
  37. \i0 ile 
  38. \i t
  39. \i0 ransfer 
  40. \i p
  41. \i0 rotocol 
  42. \i boot
  43. \i0 .]  All kernels which can be booted must be located in the tftpboot root directory, which is typically\
  44. \
  45.     
  46. \f0 /private/tftpboot
  47. \f2 \
  48. \
  49. on our system.  Any pathname given, either for the default kernel or for a per-client kernel, is relative to the tftpboot root directory; further, that directory is considered as the root directory for the tftpboot process, so a path like\
  50. \
  51.     
  52. \f0 /sdmach\
  53. \
  54.  
  55. \f2 will be interpreted as\
  56. \
  57.     
  58. \f0 /private/tftpboot/sdmach
  59. \f2 .\
  60. \
  61. (Why is this done?  Security: it prevents booting arbitrary files from the boot server.)\
  62. \
  63. Then there's the local information: a host type, ethernet address, IP address, and bootfile.  These are all obtained from NetInfo.  Note that, although the host type appears in 
  64. \f0 bootptab
  65. \f2 , it is not present in NetInfo; if an 
  66. \f0 niload
  67. \f2 (8) is done, it 
  68. \b\fs22 MUST
  69. \b0\fs24  have the value 1 (else 
  70. \f0 niload
  71. \f2  will yield an error).  If you 
  72. \f0 nidump bootptab
  73. \f2 , a 1 will be provided in the field.\
  74. \
  75. Now, the stage is set for explaining how the netboot sequence occurs, regarding the boot protocol.\
  76. \
  77. The following paragraph describes the boot sequence from the server's perspective:\
  78. \
  79.     1. A client sends a 
  80. \fs22 BOOTP
  81. \fs24  broadcast, asking for the file “
  82. \f0 boot
  83. \f2 ” (the name is in the 
  84. \fs22 PROM
  85. \fs24 ).  This is the\
  86.         request for the “blk0 loader,” also known as the “bootstrap loader.”  The server notices same.\
  87.     2. The server then checks in NetInfo to determine if the ethernet address in the 
  88. \fs22 BOOTP
  89. \fs24  request is known.\
  90.         The NetInfo hierarchy is searched, starting with the local domain, looking for a 
  91. \b /machines
  92. \b0  entry with\
  93.         an 
  94. \b en_address
  95. \b0  property whose value matches the address of the broadcaster.\
  96.     3. If the ethernet address is known, the server responds to the client with information including the path to\
  97.         the bootstrap loader.  This path is comprised of two components: the directory, and the file name.  The\
  98.         directory is determined from 
  99. \f0 /etc/bootptab
  100. \f2  (yes, even if NetInfo is running); this is the “tftpboot\
  101.         root” directory.  The file name was specified by the broadcaster (the client) in 1, above, as 
  102. \f0 boot
  103. \f2 .\
  104.     4. A request from the client to transfer the bootstrap loader is received; the loader is sent back, using 
  105. \fs22 TFTP
  106. \fs24 .\
  107.     5. Another 
  108. \fs22 BOOTP
  109. \fs24  request is received, this time for the pathname to the kernel.  The path is sent, determined from\
  110.         a combination of NetInfo and 
  111. \f0 /etc/bootptab
  112. \f2 .  Specifically, the tftpboot root directory (at the top\
  113.         of the tree from which kernels can be obtained) is found in 
  114. \f0 bootptab
  115. \f2 , as is the default kernel to be\
  116.         sent.  The kernel to be sent can be overridden in NetInfo: the 
  117. \b bootfile
  118. \b0  property in the client's directory\
  119.         in the /machines directory specifies this.  (Domains are searched on the server, starting with the\
  120.         server's local [.] domain, continuing up the NetInfo domain hierarchy.)  It can also be overridden by\
  121.         the client, in the boot command specified [e.g., ben()new_mach]; note that any explicit path given for\
  122.         a kernel will be relative to the tftpboot root directory.\
  123. \
  124. Transfer of the kernel, using TFTP, completes this phase of the boot sequence.\
  125. \
  126. One other note.  This notion of “tftpboot root” is a bit unusual.  A 
  127. \f0 chroot
  128. \f2 (2) is only effected during the actual transfer.  If a path such as 
  129. \f0 ../MyMach
  130. \f2  (e.g., 
  131. \f0 ben ../MyMach
  132. \f2 ) is given for the kernel, strange things will result.  Specifically (assuming the normal tftpboot root) 
  133. \f0 /private/MyMach
  134. \f2  (that is, 
  135. \f0 /private/tftpboot/../MyMach
  136. \f2 ) must exist, and 
  137. \f0 MyMach
  138. \f2  must exist in the tftpboot root directory.  It is the latter of these which will actually be 
  139. \fs22 TFTP
  140. \fs24 ed to the client.  Note also that the kernel file name shouldn't have any dash characters (-) in it: the dash is used by the 
  141. \fs22 PROM
  142. \fs24 's boot command to denote arguments to be passed to the booted kernel.\
  143.  
  144. \gray333 \
  145. QA369\
  146.  
  147. \gray0 \
  148.  
  149. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320 Valid for 1.0\
  150. Valid for 2.0\
  151.  
  152. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 \
  153.  
  154.